<?php
/**
 * Author：晴天 QQ：1186258278
 * Creation：2020/3/27 17:32
 * Filename：query.php
 */
if (!defined('IN_CRONLITE')) die();
$USERDATA = login_data::user_data();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html style="<?= background::image() == false ? 'background:linear-gradient(to left, #70e1f5, #ffd194);' : background::image() ?>">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
    <title><?= $conf['sitename'] . ($conf['title'] == '' ? '' : ' - ' . $conf['title']) ?></title>
    <meta name="keywords" content="<?= $conf['keywords'] ?>">
    <meta name="description" content="<?= $conf['description'] ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/AppStore/css/style.css"/>
    <link href="<?= $cdnpublic ?>Swiper/4.5.1/css/swiper.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="<?php echo $cdnpublic ?>html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="<?php echo $cdnpublic ?>respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<style>
    body {
        width: 100%;
        max-width: 648px;
        margin: 0 auto;
        color: #666;
        background: #f7f7f7;
        font-size: 12px;
        overflow-x: hidden;
    }

    .qt-header {
        height: 10vh;
        background: #ff4e50; /* fallback for old browsers */
        background: -webkit-linear-gradient(to right, #ff4e50, #f9d423); /* Chrome 10-25, Safari 5.1-6 */
        background: linear-gradient(to right, #ff4e50, #f9d423); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
        line-height: 10vh;
    }

    .qt-header > input {
        height: 5vh;
        width: 100%;
        border: none;
        text-indent: 2.5em;
        line-height: 5vh;
        border-radius: 0.5em;
        font-size: 0.7rem;
    }

    .qt-header > span {
        position: absolute;
        margin-left: 0.6rem;
        font-size: 0.7rem;
    }

    .qt-card {
        box-shadow: 0px 0px 6px #eee;
        border-radius: 0.5em;
    }

    .qt-card img {
        width: 6em;
        max-width: 100%;
        height: 6em;
        border-radius: 0.5em;
        box-shadow: 3px 3px 16px #eee;
    }

    .qt-btn {
        border-radius: 0.5em;
        border: solid 1px #eee;
    }
</style>
<section class="jq22-flexView">
    <header class="jq22-navBar jq22-navBar-fixed">
        <a href="user/" class="jq22-navBar-item" title="进入后台">
            <?= ($USERDATA == false ? '游客' : '<img src="' . $USERDATA['image'] . '" />'); ?>
        </a>
        <div class="jq22-center">
            <div class="jq22-search-box">
                <input type="text" style="text-indent: 0em;padding-left:1em" id="query"
                       onkeydown="if(event.keyCode==13){OrderManagement.OrderQuery('OrderAll',$('#query').val())}"
                       placeholder="搜索我的订单">
            </div>
        </div>
        <a href="javascript:OrderManagement.OrderQuery('OrderAll',$('#query').val())" class="jq22-navBar-item">
            <i class="layui-icon layui-icon-search" style="color: #ff5a7c;font-size: 2em"></i>
        </a>
    </header>
    <section class="jq22-scrollView">
        <div class="layui-card-body" style="padding: 0">
            <div class="layui-tab layui-tab-brief" style="background-color: white" lay-filter="docDemoTabBrief">
                <ul class="layui-tab-title" style="text-align: center;">
                    <li class="layui-this">已提交订单</li>
                    <li>待提交订单</li>
                    <li>订单查询</li>
                    <li onclick="location.href = './?mod=extract';">卡密提取</li>
                </ul>
                <div class="layui-tab-content"
                     style="padding: 1em;padding-bottom: 3em;overflow:hidden;overflow-y: auto;min-height: 80vh">
                    <?php if ($conf['notice_check'] != '') { ?>
                        <div style="width: 100%;min-height: 3em;padding: 1em;box-shadow: 0px 0px 16px #eee;border-radius: 0.5em;margin-bottom: 1em;">
                            <?= $conf['notice_check'] ?>
                        </div>
                    <?php } ?>
                    <div class="layui-tab-item layui-show" id="order_all"></div>
                    <div class="layui-tab-item" id="order_a"></div>
                    <div class="layui-tab-item">
                        <div class="layui-card">
                            <div class="layui-card-body">

                                <div class="layui-form layui-form-pane">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">下单信息</label>
                                        <div class="layui-input-block">
                                            <input type="text" id="vae"
                                                   onkeydown="if(event.keyCode==13){merchandise.query_sep($('#vae').val())}"
                                                   required lay-verify="required" placeholder="请填写下单信息！"
                                                   autocomplete="off"
                                                   class="layui-input">
                                        </div>
                                    </div>
                                    <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid layui-btn-radius layui-btn-sm"
                                            style="background-color: white;color: #666;border: 1px solid #000"
                                            id="submit_query">
                                        查询未绑定用户的订单
                                    </button>
                                    <div id="content_query"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="divHeight"></div>
        <div style="text-align: center;margin-top: 1em;" class="layui-text">
            <div>© <?= $conf['sitename'] ?>. All rights reserved.</div>
            <div><?= $conf['notice_bottom'] ?></div>
            <div><?= $conf['statistics'] ?></div>
        </div>
        <div style="height:55px"></div>
    </section>
    <footer class="jq22-footer jq22-footer-fixed" style="width: 100%;max-width: 648px">
        <a href="/" class="jq22-tabBar-item">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-home"></i>
                </span>
            <span class="jq22-tabBar-item-text">首页</span>
        </a>
        <a href="/?mod=class" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                     <i class="layui-icon layui-icon-app"></i>
                </span>
            <span class="jq22-tabBar-item-text">分类</span>
        </a>
        <a href="/?mod=query" class="jq22-tabBar-item " style="color: red">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-form"></i>
                </span>
            <span class="jq22-tabBar-item-text" style="color: red">订单</span>
        </a>
        <a href="?mod=cart" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-cart"></i>
                </span>
            <span class="jq22-tabBar-item-text">购物车</span>
        </a>
        <a href="user" class="jq22-tabBar-item ">
                <span class="jq22-tabBar-item-icon">
                    <i class="layui-icon layui-icon-user"></i>
                </span>
            <span class="jq22-tabBar-item-text">我的</span>
        </a>
    </footer>

</section>
<script src="<?php echo $cdnpublic ?>jquery/1.12.4/jquery.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
<script src="<?= $cdnpublic ?>Swiper/4.5.1/js/swiper.min.js"></script>
<script>logo = "<?=$conf['logo']?>"</script>
<script src="<?php echo $cdnserver; ?>assets/js/main.js?var=<?= $accredit['versions'] ?>"></script>
<script src="/template/AppStore/template.js?var=<?= $accredit['versions'] ?>"></script>
<script>
    var swiper = new Swiper('.swiper-container', {
        slidesPerView: 1,
        spaceBetween: 30,
        loop: true,
        pagination: {
            el: '.swiper-pagination',
            dynamicBullets: true,
        }
    });
    var swiper = new Swiper('.swiper-container-class', {
        slidesPerView: 1,
        spaceBetween: 30,
        loop: true,
    });
    OrderManagement.OrderQuery('OrderAll'); // 进入页面查询全部订单
    layui.use('flow', function () {
        var flow = layui.flow;
        flow.lazyimg();
    });
</script>
</body>
</html>

